import request from '@/utils/request'

// 查询配件单列表
export function listBizParts (query) {
  return request({
    url: '/biz/bizOrderAccessory/list',
    method: 'get',
    params: query
  })
}

// 查询配件单详细
export function getBizParts (id) {
  return request({
    url: '/biz/bizOrderAccessory/' + id,
    method: 'get'
  })
}

// 新增配件单
export function addBizParts (data) {
  return request({
    url: '/biz/bizOrderAccessory/addAccessory',
    method: 'post',
    data: data
  })
}

// 修改配件单
export function updateBizParts (data) {
  return request({
    url: '/biz/bizOrderAccessory/editAccessory ',
    method: 'post',
    data: data
  })
}

// 删除配件单
export function delBizParts (id) {
  return request({
    url: '/biz/bizOrderAccessory/' + id,
    method: 'delete'
  })
}


// 导出配件单
export function exportBizParts (query) {
  return request({
    url: '/biz/bizOrderAccessory/export',
    method: 'get',
    params: query
  })
}

// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/biz/bizOrderAccessory/getInitData/' + dictTypes,
    method: 'get'
  })
}
